/*
 * Link.h
 *
 *  Created on: 14.04.2010
 *      Author: king
 */

#ifndef LINK_H_
#define LINK_H_

#include <QGraphicsLineItem>

namespace etu {
namespace ui {

class CNode;

class CLink : public QGraphicsLineItem
{
public:
    CLink(CNode *fromNode, CNode *toNode);
    ~CLink();

    CNode *fromNode() const;
    CNode *toNode() const;

    void setColor(const QColor &color);
    QColor color() const;

    void trackNodes();

    virtual void paint(QPainter *painter,
                 const QStyleOptionGraphicsItem *option, QWidget *widget);
private:
    CNode *m_fromNode;
    CNode *m_toNode;
};

}
}

#endif /* LINK_H_ */
